const path = require('path');
const { generateTheme } = require('antd-theme-generator');

const options = {
    stylesDir: path.join(__dirname, "/src/styles"),
    antDir: path.join(__dirname, "/node_modules/ant-design-vue"),
    varFile: path.join(__dirname, "/src/styles/variables.less"),
    mainLessFile: path.join(__dirname, "/src/styles/index.less"),
    themeVariables: [
        "@primary-color",
        "@secondary-color",
        "@highlight-color",
        "@warning-color",
        "@normal-color",
        "@white",
        "@black",

        "@layout-body-background",
        "@layout-header-background",
        "@layout-footer-background",
        "@layout-sider-background",
        "@layout-trigger-background",
        "@layout-trigger-color",
        "@layout-sider-background-light",
        "@layout-trigger-background-light",
        "@layout-trigger-color-light",

        "@border-radius-base",
        "@body-background",

        "@component-background",

        "@icon-color",
        "@icon-color-hover",

        "@heading-color",
        "@heading-color-dark",

        "@text-color",
        "@text-color-secondary",
        "@text-color-dark",
        "@text-color-secondary-dark",
        "@text-selection-bg",
        "@text-color-inverse",

        "@item-active-bg",
        "@item-hover-bg",

        "@link-color",
        "@link-hover-color",
        "@link-active-color",

        "@border-color-base",
        "@border-color-split",
        "@border-color-inverse",
        "@border-width-base",
        "@border-style-base",

        "@outline-color",

        "@background-color-light",
        "@background-color-base",

        "@disabled-color",
        "@disabled-bg",
        "@disabled-color-dark",

        "@shadow-color",

        "@btn-primary-color",
        "@btn-primary-bg",

        "@btn-default-color",
        "@btn-default-bg",
        "@btn-default-border",

        "@btn-danger-color",
        "@btn-danger-bg",
        "@btn-danger-border",

        "@btn-disable-color",
        "@btn-disable-bg",
        "@btn-disable-border",

        "@checkbox-color",
        "@checkbox-check-color",

        "@descriptions-bg",

        "@dropdown-selected-color",

        "@radio-dot-color",
        "@radio-button-bg",
        "@radio-button-checked-bg",
        "@radio-button-color",
        "@radio-button-hover-color",
        "@radio-button-active-color",

        "@label-required-color",
        "@label-color",
        "@form-warning-input-bg",
        "@form-error-input-bg",

        "@input-color",
        "@input-border-color",
        "@input-bg",
        "@input-number-hover-border-color",
        "@input-number-handler-active-bg",
        "@input-number-handler-hover-bg",
        "@input-number-handler-bg",
        "@input-number-handler-border-color",
        "@input-addon-bg",
        "@input-hover-border-color",
        "@input-disabled-bg",

        '@select-border-color',
        '@select-item-selected-color',
        '@select-dropdown-bg',
        '@select-item-selected-bg',
        '@select-item-active-bg',
        '@select-background',

        '@anchor-border-color',

        '@tooltip-color',
        '@tooltip-bg',
        '@tooltip-arrow-color',

        '@popover-bg',
        '@popover-color',
        '@popover-arrow-color',
        '@popover-arrow-outer-color',

        '@modal-header-bg',
        '@modal-heading-color',
        '@modal-footer-bg',
        '@modal-mask-bg',

        '@progress-default-color',
        '@progress-remaining-color',
        '@progress-text-color',

        '@menu-bg',
        '@menu-popup-bg',
        '@menu-item-color',
        '@menu-highlight-color',
        '@menu-item-active-bg',
        '@menu-item-group-title-color',
        '@menu-dark-color',
        '@menu-dark-bg',
        '@menu-dark-arrow-color',
        '@menu-dark-submenu-bg',
        '@menu-dark-highlight-color',
        '@menu-dark-item-active-bg',
        '@menu-dark-selected-item-icon-color',
        '@menu-dark-selected-item-text-color',
        '@menu-dark-item-hover-bg',

        '@table-header-sort-active-bg',
        '@table-header-filter-active-bg',
        '@table-selection-column-width',
        '@table-header-bg',
        '@table-header-color',
        '@table-header-sort-bg',
        '@table-body-sort-bg',
        '@table-row-hover-bg',
        '@table-selected-row-color',
        '@table-selected-row-bg',
        '@table-body-selected-sort-bg',
        '@table-selected-row-hover-bg',
        '@table-expanded-row-bg',
        '@table-footer-bg',
        '@table-footer-color',
        '@table-header-bg-sm',

        '@tag-default-bg',
        '@tag-default-color',

        '@time-picker-selected-bg',

        '@badge-text-color',

        '@rate-star-color',
        '@rate-star-bg',

        '@card-head-color',
        '@card-head-background',
        '@card-actions-background',
        '@card-skeleton-bg',
        '@card-background',
        '@card-shadow',

        '@comment-author-name-color',
        '@comment-author-time-color',
        '@comment-action-color',
        '@comment-action-hover-color',

        '@tabs-card-head-background',
        '@tabs-card-active-color',
        '@tabs-ink-bar-color',
        '@tabs-highlight-color',
        '@tabs-hover-color',
        '@tabs-active-color',

        '@back-top-color',
        '@back-top-bg',
        '@back-top-hover-bg',

        '@avatar-bg',
        '@avatar-color',

        '@switch-color',
        '@switch-shadow-color',

        '@pagination-item-bg-active',

        '@page-header-back-color',

        '@breadcrumb-base-color',
        '@breadcrumb-last-item-color',
        '@breadcrumb-link-color',
        '@breadcrumb-link-color-hover',
        '@breadcrumb-separator-color',

        '@slider-rail-background-color',
        '@slider-rail-background-color-hover',
        '@slider-track-background-color',
        '@slider-track-background-color-hover',
        '@slider-handle-background-color',
        '@slider-handle-color',
        '@slider-handle-color-hover',
        '@slider-handle-color-focus-shadow',
        '@slider-handle-color-tooltip-open',
        '@slider-handle-shadow',
        '@slider-dot-border-color',
        '@slider-dot-border-color-active',
        '@slider-disabled-color',
        '@slider-disabled-background-color',

        '@tree-directory-selected-color',
        '@tree-directory-selected-bg',
        '@tree-node-hover-bg',
        '@tree-node-selected-bg',

        '@collapse-header-bg',
        '@collapse-content-bg',

        '@skeleton-color',

        '@transfer-disabled-bg',

        '@alert-success-border-color',
        '@alert-success-bg-color',
        '@alert-success-icon-color',
        '@alert-info-border-color',
        '@alert-info-bg-color',
        '@alert-info-icon-color',
        '@alert-warning-border-color',
        '@alert-warning-bg-color',
        '@alert-warning-icon-color',
        '@alert-error-border-color',
        '@alert-error-bg-color',
        '@alert-error-icon-color',

        '@list-header-background',
        '@list-footer-background',

        '@timeline-color',
        '@timeline-dot-color',
        '@timeline-dot-bg',




    ],
    indexFileName :'./public/index.html',
    outputFilePath: path.join(__dirname, "/public/color.less")
};

generateTheme(options)
    .then(less => {
        console.log("Theme generated successfully");
    })
    .catch(error => {
        console.log("Error", error);
    });